package com.example.mapper;

import com.example.domain.Student;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {
    //查询所有学生
    List<Student> getAllStudent();
    //根据id查询学生
    Student getStudentById(Long id);
    //根据id查询学生成绩
    Double getScoreById(Long id);
    //根据id和班级id查询学生排名
    Integer getRankByIdAndClassId(@Param("id") Long id, @Param("classId") Integer classId);
    //根据id查询学生综合信息
    @MapKey("studentId")
    List<Map<String, Double>> getComprehensiveInfoById(Long id);
     //根据id查询学生课前信息
    @MapKey("studentId")
    List<Map<String, Double>> getBeforeClassInfoById(Long id);
    //根据id查询学生课中信息
    @MapKey("studentId")
    List<Map<String, Double>> getDuringClassInfoById(Long id);
    //根据id查询学生课后信息
    @MapKey("studentId")
    List<Map<String, Double>> getAfterClassInfoById(Long id);
    //根据id查询学生进步信息
    @MapKey("studentId")
    List<Map<String, Double>> getAdvancedInfoById(Long id);
    //根据id查询学生评语信息
    @MapKey("studentId")
    List<String> getRemarkInfoById(Long id);
}
